package com.itheima.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result {
    private int stats;
    private String message;
    private Object data;

    public static Result ok(Object data) {
        return new Result(200, "成功！", data);
    }

    public static Result error(String message) {
        return new Result(500, message, null);
    }
}